package com.htdc.web.service;

import com.htdc.web.bean.Company;
import com.htdc.web.bean.ProjectTb;
import com.htdc.web.dao.CountDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * author:zbc
 * date:2018/9/5
 * description:
 */
@Service
public class CountService {

    @Autowired
    private CountDao countDao;

    //公司列表
    public List<ProjectTb> getProject(){
        return  countDao.getProject();
    }

    //列表
    public ProjectTb getData(int pid){
        ProjectTb projectTb = countDao.getData(pid);
        return projectTb;
    }

    //租凭数据(公司)
    public  List<Company> getAllCompanyData(){

        return countDao.getAllCompanyData();
    }
    //租凭数据(项目)
    public List<ProjectTb> getAllProjectData(){

        return countDao.getAllProjectData();
    }

    //租凭合同公司数据
    public Company getCompanyData(int cid){
        Company company = countDao.getCompanyData(cid);
        return company;
    }

    //租凭合同合同数据
    public List<ProjectTb> getProjectData(int pid){
        List<ProjectTb> projects = countDao.getProjectData(pid);
        return projects;
    }
}
